﻿/*
 * File: GamePlayBaseScene_Draw.cs
 * Author: Gourav Das
 * Purpose: Draw for gameplay
 * Created: April 2011
 */

using System;
using System.Linq;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using System.Threading;
using System.IO;
using _22yards._2D;
using _22yards.Scenes.Helpers;
using _22yards.Core;
using _22yards;
using _22yards.EnumDeclarations;
using _22yards.ThreeD;
using _22yards.Helpers;
using Komires.MataliPhysics;

namespace _22yards.Scenes
{
    /// <summary>
    /// This is a scene that implements the 2D Gameplay screen
    /// </summary>
    partial class GamePlayBaseScene : Scene
    {
        /// <summary>
        /// Constructor.
        /// </summary>
        public GamePlayBaseScene()
        {
            TransitioningTime = TimeSpan.FromSeconds(1.5);
            TransitionedTime = TimeSpan.FromSeconds(1.5);
            eGamePlayType = (short)GamePlayType.TwoD;
            InitializeBase3DScene();
        }

        void GraphicsDevice_DeviceReset(object sender, EventArgs e)
        {
            SetModelEffMaterialNTexture2D();
            SetModelEffMaterialNTexture3D();
        }

        /// <summary>
        /// Draws the gameplay scene.
        /// </summary>
        public override void Draw(GameTime _gameTime)
        {
            if (eGamePlayType == (short)GamePlayType.TwoD)
            {
                Draw2DScene();
            }
            else if (eGamePlayType == (short)GamePlayType.ThreeD)
            {
                Draw3DScene();
            }
        }

    }
}
